﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converts="clr-namespace:Apps.Yunwei.Converters"
    x:Class="Apps.Yunwei.Views.AppPanel">
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <converts:TypeToCheckedConverter x:Key="TypeToCheckedConverter"/>
            <Style TargetType="TextBlock" BasedOn="{StaticResource DefaultTextBlock}">
                <Setter Property="VerticalAlignment" Value="Top"/>
                <Setter Property="TextAlignment" Value="Right"/>
                <Setter Property="Margin" Value="2,6,4,0" />
            </Style>
            <Style TargetType="TextBox" BasedOn="{StaticResource DefaultTextBox}">
                <Setter Property="TextWrapping" Value="Wrap"/>
                <Setter Property="Margin" Value="2,2,0,4" />
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" MinWidth="50"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <TextBlock Text="序号" Grid.Row="0"/>
        <TextBlock Text="代码" Grid.Row="1"/>
        <TextBlock Text="标题" Grid.Row="2"/>
        <TextBlock Text="标签" Grid.Row="3"/>
        <TextBlock Text="路径" Grid.Row="4"/>
        <TextBlock Text="类库" Grid.Row="5"/>
        <TextBlock Text="类别" Grid.Row="6"/>
        <TextBlock Text="背景" Grid.Row="7"/>
        <TextBlock Text="前景" Grid.Row="8"/>
        <TextBlock Text="图标" Grid.Row="9"/>
        <TextBlock Text="描述" Grid.Row="10"/>
        <TextBlock Text="工具" Grid.Row="11"/>
        <TextBlock Text="参数" Grid.Row="12"/>

        <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Order, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Code, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Caption, Mode=TwoWay}"/>

        <TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Tags, Mode=TwoWay}"/>

        <TextBox Grid.Column="1" Grid.Row="4" Margin="2,2,80,4" Text="{Binding URL, Mode=TwoWay}"/>
        <Button Grid.Column="1" Grid.Row="4" Margin="0,2,0,0" Width="75"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Click="ChoicePartClick"/>

        <TextBox Grid.Column="1" Grid.Row="5" Text="{Binding Arg1, Mode=TwoWay}"/>
        <TextBox Grid.Column="1" Grid.Row="6" Text="{Binding Arg2, Mode=TwoWay}"/>

        <TextBox Grid.Column="1" Grid.Row="7" Margin="2,2,80,4" Text="{Binding Bgc, Mode=TwoWay}"/>
        <Button Grid.Column="1" Grid.Row="7" Margin="0,2,0,0" Width="75"
                HorizontalAlignment="Right" VerticalAlignment="Top" Click="ChoiceBackgroundColorClick"/>

        <TextBox Grid.Column="1" Grid.Row="8" Margin="2,2,80,4" Text="{Binding Frc, Mode=TwoWay}"/>
        <Button Grid.Column="1" Grid.Row="8" Margin="0,2,0,0" Width="75"
                HorizontalAlignment="Right" VerticalAlignment="Top" Click="ChoiceForegroundColorClick"/>

        <TextBox Grid.Column="1" Grid.Row="9" Margin="2,2,80,4" Text="{Binding Icon1, Mode=TwoWay}"/>
        <Button Grid.Column="1" Grid.Row="9" Margin="0,2,0,0" Width="75"
                HorizontalAlignment="Right" VerticalAlignment="Top" Click="ChoiceImageClick"/>

        <TextBox Grid.Column="1" Grid.Row="10" Text="{Binding Descript, Mode=TwoWay}"/>
        <ToggleButton Grid.Column="1" Grid.Row="11" Margin="2,2,0,4" MinHeight="28" HorizontalAlignment="Left"
                      IsChecked="{Binding Type, Mode=TwoWay,Converter={StaticResource TypeToCheckedConverter}}"/>
        <TextBox Grid.Column="1" Grid.Row="12" Text="{Binding Args, Mode=TwoWay}"/>
    </Grid>
</UserControl>